home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / fseek.man < prev    next >
Encoding:
Text File  |  1989-03-02  |  1.6 KB  |  67 lines

  1.  
  2.  
  3.  
  4. FSEEK                 C Library Procedures                  FSEEK
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      fseek, ftell, rewind - reposition a stream
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ##iinncclluuddee <<ssttddiioo..hh>>
  13.  
  14.      ffsseeeekk((ssttrreeaamm,, ooffffsseett,, ppttrrnnaammee))
  15.      FFIILLEE **ssttrreeaamm;;
  16.      lloonngg ooffffsseett;;
  17.  
  18.      lloonngg fftteellll((ssttrreeaamm))
  19.      FFIILLEE **ssttrreeaamm;;
  20.  
  21.      rreewwiinndd((ssttrreeaamm))
  22.  
  23. DDEESSCCRRIIPPTTIIOONN
  24.      _F_s_e_e_k sets the position of the next input or output opera-
  25.      tion on the _s_t_r_e_a_m.  The new position is at the signed dis-
  26.      tance _o_f_f_s_e_t bytes from the beginning, the current position,
  27.      or the end of the file, according as _p_t_r_n_a_m_e has the value
  28.      0, 1, or 2.
  29.  
  30.      _F_s_e_e_k undoes any effects of _u_n_g_e_t_c(3S).
  31.  
  32.      _F_t_e_l_l returns the current value of the offset relative to
  33.      the beginning of the file associated with the named _s_t_r_e_a_m.
  34.      It is measured in bytes on UNIX; on some other systems it is
  35.      a magic cookie, and the only foolproof way to obtain an
  36.      _o_f_f_s_e_t for _f_s_e_e_k.
  37.  
  38.      _R_e_w_i_n_d(_s_t_r_e_a_m) is equivalent to _f_s_e_e_k(_s_t_r_e_a_m, 0L, L_SET).
  39.  
  40. SSEEEE AALLSSOO
  41.      lseek(2), fopen(3S)
  42.  
  43. DDIIAAGGNNOOSSTTIICCSS
  44.      _F_s_e_e_k returns -1 for improper seeks, otherwise zero.
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0             December 5, 1987                        1
  64.  
  65.  
  66.  
  67.